import java.util.Scanner;

public class HomeWorkDemo06 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个数字");
        int num = scanner.nextInt();//86
        int i = 2;
        boolean flag = true;
        while (i < num) {
            if (num % i == 0) {
                flag = false;
                break;
            }
            i++;
        }
        if (flag) {
            System.out.println("是质数");
        } else {
            System.out.println("不是质数");
        }


    }

}
